import request from "../request/request";

// 查询所有手机产品
export function selectAllPhones() {
    return request({
        url: '/api/phone/selectAllPhones',
        method: 'get'
    })
}
// 查询指定手机产品
export function selectPhoneById(phoneid) {
    return request({
        url: '/api/phone/selectPhoneById',
        method: 'get',
        params: {
            phoneid
        }
    })
}
// 查询指定供应商信息
export function selectSupplierById(supplierid) {
    return request({
        url: '/api/phone/selectSupplierById',
        method: 'get',
        params: {
            supplierid
        }
    })
}
// 通过ES模糊查找产品信息
export function searchPhoneES(index, phone) {
    return request({
        url: `/api/phone/searchPhoneES/${index}`,
        method: 'post',
        data: phone
    })
}